<!--
 * @Author: tianhao
 * @Date: 2022-12-30 15:28:02
 * @LastEditTime: 2023-02-21 15:47:30
 * @LastEditors: tianhao
 * @Description: 
 * @FilePath: \dcollege\src\views\task\zhenti.vue
 * 可以输入预定的版权声明、个性签名、空行等
-->
<template>
  <div class="top">
    <var-icon name="chevron-left" :size="30" class="ret" @click="fanHui()" />
    <div class="title1">历年真题</div>
  </div>
  <!-- <a href="/dlpage?id={{ ti.id }}"
      ><div class="jingxuan" v-for="ti in data">
        <div class="title3">{{ ti.title }}</div>
        <div class="gong">共</div>
        <div class="count">{{ ti.count }}</div>
        <div class="daoti">道题</div>
        <div class="time">考试时长：125分钟</div>
      </div></a
    > -->
  <div class="jingxuan" v-for="ti in list.records">
    <router-link :to="{ name: 'dlpage', query: { name: ti.name,count: 24 } }">
      <div class="q">
        <div class="title3">{{ ti.name }}</div>
        <div class="gong">共</div>
        <div class="count">25</div>
        <div class="daoti">道题</div>
        <div class="time">考试时长：125分钟</div>
      </div>
    </router-link>
  </div>
  <!-- <a href="/dlpage"
    ><div class="jingxuan" v-for="ti in data">
      <div class="multiple">多选题</div>
      <div class="title3">{{ ti.title }}</div>
      <div class="level">难易程度</div>
    </div></a
  > -->
</template>

<script setup lang="ts">
import { ref } from "vue";
import { useRouter } from "vue-router";
import { storeToRefs } from "pinia";
import { useExamStore } from "@/stores/exam";
const examStore = useExamStore();
const { getExamLists } = examStore;
const { list } = storeToRefs(examStore);
getExamLists();
const router = useRouter();
function fanHui() {
  router.go(-1);
}
</script>

<style lang="less" scoped>
.top {
  width: 100%;
  height: 60px;
  border-bottom: none;
}
.ret {
  float: left;
  margin-top: 30px;
}
.title1 {
  font-size: 20px;
  position: absolute;
  margin-top: 30px;
  margin-left: 150px;
}
.jingxuan {
  width: 95%;
  height: 100px;
  background-color: white;
  border-radius: 10px;
  margin-left: 10px;
  margin-top: 10px;
}
.q {
  width: 100%;
  height: 100px;
}
.title3 {
  position: absolute;
  float: left;
  margin: 10px auto auto 20px;
  color: black;
  font-size: 18px;
  font-weight: bold;
}
.gong {
  position: absolute;
  margin: 55px auto auto 20px;
  color: rgb(123, 121, 121);
}
.count {
  position: absolute;
  font-size: 22px;
  margin: 48px auto auto 38px;
  color: rgb(66, 106, 237);
  font-weight: bolder;
}
.daoti {
  position: absolute;
  margin: 55px auto auto 65px;
  color: rgb(123, 121, 121);
}
.time {
  position: absolute;
  color: rgb(123, 121, 121);
  margin: 55px auto auto 200px;
}
</style>
